import App from './App'
// 多语言
import VueI18n from "vue-i18n";
Vue.use(VueI18n);
// 使用uview-ui
import uView from '@/uni_modules/uview-ui'
Vue.use(uView)

// 使用顶部状态栏
import barHeight from '@/components/barHeight.vue'
Vue.component('barHeight',barHeight)

// 接口封装
import Request from '@/common/request.js'
Vue.prototype.$Request = Request

// 多语言配置
const i18n = new VueI18n({
    locale: uni.getStorageSync('lang') == (undefined || "" || null) ?
        "zh" :
        uni.getStorageSync('lang'),
    messages: {
        zh: require("./language/text-zh.json"),
        en: require("./language/text-en.json")
    },
	 silentTranslationWarn: true, // 去除国际化警告
});
Vue.prototype._i18n = i18n
// #ifndef VUE3
import Vue from 'vue'
Vue.config.productionTip = false
App.mpType = 'app'
const app = new Vue({
	 i18n,
    ...App
})
app.$mount()
// #endif

// #ifdef VUE3
import { createSSRApp } from 'vue'
export function createApp() {
  const app = createSSRApp(App)
  return {
    app
  }
}
// #endif
